<?php

namespace Acme\TaskBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;

use Doctrine\ORM\Mapping as ORM;

/**
 * Acme\TaskBundle\Entity\Category
 * 
 * @ORM\Table(name="category")
 * @ORM\Entity(repositoryClass="Acme\TaskBundle\Repository\TaskRepository") 
 */
class Category
{
    /**
     * @var integer $id
     * 
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO") 
     */
    private $id;

    /**
     * @var string $name
     * 
     * @ORM\Column(name="name", type="string", length=100) 
     */
    private $name;

	/**
     * @ORM\OneToMany(targetEntity="Task", mappedBy="category")
     */
    protected $tasks;

    public function __construct()
    {
        $this->tasks = new ArrayCollection();
    }
    
    /**
     * Get tasks
     *
     * @return integer
     */
    public function getTasks()
    {
    	return $this->tasks;
    }
    
    /**
     * Set tasks
     *
     * @param string $tasks
     */
    public function setTasks(ArrayCollection $tasks)
    {
    	$this->tasks = $tasks;
    }
    
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }
}